/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.designPatterns.creational.factoryMethod;

import ac.za.designPatterns.creational.factoryMethod.factory.CarFactory;
import ac.za.designPatterns.creational.factoryMethod.model.ClassicCar;
import ac.za.designPatterns.creational.factoryMethod.model.MordenCar;

/**
 *
 * @author Sandiso Toto
 */
public class TestFactory {
    public static  void main(String[] args){
    
        CarFactory carfactory = new CarFactory();
        
        Car carA = carfactory.getCar("Toyota Hilux");
        System.out.println("CarA drive: "+ carA.drive(15));
        System.out.println("CarA stop: "+ carA.stop());
        
        
         Car carB = carfactory.getCar("Cressida");
         System.out.println("CarB drive: "+ carB.drive(15));
        System.out.println("CarB stop: "+ carB.stop());
        
       
    }
    
}
